<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>运营平台</title>
   
	
	
	<import type="css" basepath="__CSS__" file="bootstrap" />
	<import type="css" basepath="__CSS__" file="datetimepicker" />
	<import type="css" basepath="__CSS__" file="fontawesome" />
	<import type="css" basepath="__CSS__" file="fonts" />
	<import type="css" basepath="__CSS__" file="bootgrid" />
	<import type="css" basepath="__CSS__" file="style" />
	<import type="css" basepath="__CSS__" file="newStudentWeb" />
</head>
<body>
<div class="topNav">
    <span class="text"><i class="iconfont">&#xe607;</i><a href="{:U('Index/index')}" target="_top">首页</a>&gt;<span>惠通知管理</span>&gt;<span>惠通知详情</span></span>
</div>
<div class="pageTitle">
    <h2 class="title">惠通知详情</h2>
</div>
<div class="searchBox">
    <form>
        <!-- formOne formTwo formThree formFour(备用) -->
        <div class="formOne formDivide formBusiness">
            <div class="line">
                <span class="name">商家名称</span>
                <div class="col-md-6 col-sm-10 col-xs-8">
                    <input type="text" value="{$dataInfo.shop_name}" readonly="readonly" class="inpTextOne form-control"">
                </div>
            </div>
            <div class="line">
                <span class="name">标题</span>
                <div class="col-md-6 col-sm-10 col-xs-8">
                    <input type="text" value="{$dataInfo.title}"  readonly="readonly" class="inpTextOne form-control"> 
                </div>
            </div>
            <div class="line">
                <span class="name benefitContent">内容</span>
                <div class="col-md-6 col-sm-10 col-xs-8 benefitRichText">
                    <img src="/Uploads/not/{$dataInfo.not_pic}"/>
                    <p class="benefitText">{$dataInfo.description}</p>
                </div>
            </div>
        </div>
        <div class="formTwo formDivide formBusiness">
            <div class="line">
                <span class="name">发布时间</span>
                <div class="col-md-6 col-sm-10 col-xs-8">
                    <input type="text" value="{$dataInfo.add_time|date='Y-m-d',###}" readonly="readonly" class="inpTextOne form-control">
                </div>
            </div>
            <div class="line">
                <span class="name">有效期</span>
                <div class="col-md-6 col-sm-10 col-xs-8">
                    <input type="text" value='{$dataInfo.start_time|date='Y-m-d',###}至{$dataInfo.end_time|date='Y-m-d',###}' readonly="readonly" class="inpTextOne form-control">
                </div>
            </div>
        </div>
        <div class="formDivide ">
            <div class="line benefitActiveBtn">
                <div class="btnMiddle">
                   <if condition="$item.check_status eq 0 ">
                    <button type="button" class="btn btn-primary  btn-lg" data-type="submit" data-text="请确认是否进行审核！" id='sh'>审核</button>
                    <else/>
                    <button type="button" class="btn btn-primary  btn-lg" data-type="submit" data-text="请确认是否进行审核！" id='sh' style="display:none">审核</button>
                   </if>
                    <a href="{:U('Notice/index')}"><button type="button" class="btn btn-warning btn-lg">返回</button></a>
                </div>
            </div>
        </div>
    </form>
</div>

</div>
<!--提示模态框 begin-->
<div class="modal fade" id="popupPrompt">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body" style="padding:50px;">
               <p class="text">
                    <div class="col-md-6 col-sm-10 col-xs-8">
                        <span class="name">驳回原因：</span><input type="text" class="form-control" id='bh'>
                    </div>
               </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" data-dismiss="modal" cid='{$dataInfo.id}'>通过</button>
                <button type="button" class="btn btn-info" data-dismiss="modal" cid='{$dataInfo.id}'>驳回</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<script src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/App/Admin/public/js/bootstrap.min.js"></script>
<script src="/App/Admin/public/js/jquery.datetimepicker.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.min.js"></script>
<script src="/App/Admin/public/js/jquery.bootgrid.fa.min.js"></script>
<script src="/App/Admin/public/js/time.js"></script>
<script src="/App/Admin/public/js/tables.js"></script>
<script src="/App/Admin/public/js/plug/gain.js"></script>
<script src="/App/Admin/public/js/form.js"></script>
<script>
    $(".btn-success").click(function(){
        var cid=$(this).attr('cid');
       
    	$.post('{:U('Notice/checkStatus')}',{cid:cid},function(data){
            if(data==100){
                $('#sh').css('display','none');
                alert('通过审核');
            }
        });
    })
</script>
<script>
    $(".btn-info").click(function(){
        var cid=$(this).attr('cid');
        var bh=$("#bh").val();
       $.post('{:U('Notice/reject')}',{'cid':cid,'bh':bh},function(data){
            if(data==1){
                $('#sh').css('display','none');
                alert('审核驳回');
            }
        });
    })
</script>
</body>
</html>